package com.tianyang.yukuaifuzs.business.auth.adapter;

import androidx.annotation.NonNull;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.tianyang.yukuaifuzs.R;
import com.tianyang.yukuaifuzs.business.main.bean.PosUserOutput;
import com.tianyang.yukuaifuzs.common.utils.CommonUtils;
import com.tianyang.yukuaifuzs.utils.VerifyUtil;

import java.util.ArrayList;

/**
 * Description：商户审核中
 * Created by xyj on 2024/3/12
 */
public class MerchantCheckAdapter extends BaseQuickAdapter<PosUserOutput, BaseViewHolder> {

    public MerchantCheckAdapter() {
        super(R.layout.item_merchant_check, new ArrayList<>());
    }

    @Override
    protected void convert(@NonNull BaseViewHolder helper, PosUserOutput item) {
        if (item != null) {
            helper.setText(R.id.createTimeTv, VerifyUtil.checkString(item.getCreateDate()))
                    .setText(R.id.mchTypeTv, item.getName() + "（" + CommonUtils.getMerchantName(item.getMchType()) + "）")
                    .setText(R.id.phoneTv, "联系商家 " + item.getPhone())
                    .addOnClickListener(R.id.queryStatusTv);
        }
    }
}
